package com.itany.shop.service;

import com.itany.shop.exception.ProductNotExistException;
import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;

/**
 * @author Miss Chen
 * @version 1.0
 * @date 2024年08月15日15:20
 */
public interface CartService {

    /**
     * 将指定商品添加到购物车中
     * @param cart
     * @param id
     */
    public void addCart(Cart cart, Integer id) throws RequestParameterErrorException, ProductNotExistException, UserNotLoginException;

    /**
     * 删除购物车中指定商品
     * @param cart
     * @param id
     */
    public void removeCart(Cart cart, Integer id) throws RequestParameterErrorException, UserNotLoginException;

    /**
     * 修改购物车中指定明细数量
     * @param cart
     * @param id
     * @param num
     */
    public void modifyCart(Cart cart, Integer id, Integer num) throws RequestParameterErrorException, UserNotLoginException;

}
